import request from '@/utils/request'

// 查询点餐列列表
export function listShow(query) {
  return request({
    url: '/diancan/show/list',
    method: 'get',
    params: query
  })
}

// 查询点餐列详细
export function getShow(diancanId) {
  return request({
    url: '/diancan/show/' + diancanId,
    method: 'get'
  })
}

// 新增点餐列
export function addShow(data) {
  return request({
    url: '/diancan/show',
    method: 'post',
    data: data
  })
}

// 修改点餐列
export function updateShow(data) {
  return request({
    url: '/diancan/show',
    method: 'put',
    data: data
  })
}

// 删除点餐列
export function delShow(diancanId) {
  return request({
    url: '/diancan/show/' + diancanId,
    method: 'delete'
  })
}

//统计点餐列总金额
export function totalPrice(diancanId){
  return request({
    url:'/diancan/show/' + diancanId,
    method:'put'
  })
}

//按餐品种类统计分别统计点餐种类的总数量
export function categoryPie(){
  return request({
    url:'/views/testchartsv2/categoryPie/',
    method:'get'
  })
}

